<!--
 * @Author: gaojinyu 1593026814@qq.com
 * @Date: 2023-12-15 15:15:21
 * @LastEditors: gaojinyu 1593026814@qq.com
 * @LastEditTime: 2023-12-26 16:09:26
 * @FilePath: \smart-community\src\components\BussComponents\PartyMemberStructure.vue
 * @Description: 
 * 
 * Copyright (c) 2023 by ${git_name_email}, All Rights Reserved. 
-->
<template>
  <BoxTitleInCenter title="党员结构">
    <template #body>
      <div class="row_box">
        <div class="row1">
          <ProportionBar :data="proportionBarData"></ProportionBar>
        </div>
        <div class="row2">
          <div>
            <VCharts :chartOption="chartData.option2()"></VCharts>
          </div>
          <div>
            <VCharts :chartOption="chartData.option3()"></VCharts>
          </div>
        </div>
        <div class="row3">
          <div class="col1">
            <VCharts :chartOption="chartData.option4()"></VCharts>
          </div>
          <div class="col2">
            <VCharts :chartOption="chartData.option12()"></VCharts>
          </div>
            
        </div>
      </div>
    </template>
  </BoxTitleInCenter>
</template>

<script setup>
import ProportionBar from "@/components/ProportionBar/index.vue";
import chartData from "@/config/chartOption.js";
import { reactive } from "vue";
let proportionBarData = reactive([
  {
    name: "男性",
    value: 155,
    color: "#11b0bd",
  },
  {
    name: "女性",
    value: 127,
    color: "#E4C200",
  },
]);
</script>

<style lang="scss" scoped>
.row_box{
  width: 100%;
  height: 100%;
  @include display(center, center, column);
}
.row1,
.row2,
.row3 {
  width: 100%;
  height: 0;
}
.row1{
  flex-grow: 1;
  @include display(center, center, row);
  margin-bottom: 30px;
  padding: 0 60px;
  box-sizing: border-box;
}
.row2 {
  @include display(center, center, row);
  flex-grow: 4;
  & > div {
    width: 100%;
    height: 100%;
    flex-grow: 1;
  }
}
.row3 {
  flex-grow: 5;
  @include display(center, center, row);
  padding-left: 40px;
  box-sizing: border-box;
  &>div{
    width: 0;
    flex-grow: 1;
    height: 100%;
  }
  
}
</style>
